package com.base.datastructer.tree;


public abstract class AbstractTreeNode {
    
    protected int data;
    protected TreeNode pLeft;
    protected TreeNode PRight;
    
    public AbstractTreeNode(){
        this.data = -1;
        this.pLeft = null;
        this.PRight = null;
    }
    
    public AbstractTreeNode(int x){
        this.data = x;
        this.pLeft = null;
        this.PRight = null;
    }
    
    public int getData() {
        return data;
    }
    
    public void setData(int data) {
        this.data = data;
    }
    
    public TreeNode getpLeft() {
        return pLeft;
    }
    
    public void setpLeft(TreeNode pLeft) {
        this.pLeft = pLeft;
    }
    
    public TreeNode getPRight() {
        return PRight;
    }
    
    public void setPRight(TreeNode pRight) {
        PRight = pRight;
    }
    
    public abstract void printInfoNode();
    
    public abstract boolean isNull();
}
